com.rscja.deviceapi.interfaces

## Interface IFingerprint

- All Known Implementing Classes:
    Fingerprint, Fingerprint_qcom

      public interface IFingerprint

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `autoEnroll(int count, int userID)` 刷指定次数指纹，模块自动完成注册功能 Scan fingerprint in specified number, module complete registered function automatically
    `int[]` | `autoMatch(int count, int startPage, int pageNum)` 刷指定次数指纹，自动完成比对功能 Scan fingerprint in specified number, complete comparison function automatically
    `boolean` | `deletChar(int pageID, int num)` 删除库中特征值 delete feature value in database.
    `boolean` | `downChar(Fingerprint.BufferEnum buffer, java.lang.String hexStr)` 下载特征数据到指定缓存区 download feature data to specified buffer zone
    `boolean` | `empty()` 清空模块中保存的指纹数据 empty out saved fingerprint data in module.
    `boolean` | `free()` 释放指纹模块 Release fingerprint module.
    `boolean` | `genChar(Fingerprint.BufferEnum buffer)` 生成特征值（存于指定缓存区） Generate feature value( save in specified buffer zone)
    `boolean` | `getImage()` 获取指纹图像（存于模块图像缓存区） Acquire fingerprint image( save in buffer zone of module image)
    `java.lang.String` | `getRandomData()` 获取随机数，检测模块是否正常 Acquire random number, detect module is normal or not.
    `java.lang.String` | `getVersion()` 获取模块版本 Acquire module version
    `boolean` | `init()` 初始化指纹模块，默认波特率为57600 Initialize fingerprint module, default baud rate is 57600.
    `boolean` | `init(int baudrate)` 初始化指纹模块 Initialize fingerprint module.
    `boolean` | `isPowerOn()`
    `boolean` | `loadChar(Fingerprint.BufferEnum buffer, int pageID)` 加载指定ID页到特征值缓存区 Load specified ID page to feature value buffer zone
    `int` | `match()` 对比模板缓冲区1与模板缓冲区2的指纹模板文件 fingerprint template file of comparison template buffer zone 1 and template buffer zone 2.
    `java.lang.String` | `readChipSN()` 获取芯片序列号 acquire chip serial number
    `java.lang.String` | `readSysPara()` 获取系统参数，仅返回版本号 Acquire system parameter, return version number only
    `java.lang.String[]` | `readSysParaMore()` 获取系统参数 Acquire system parameter
    `boolean` | `regModel()` 合并特征文件。将模板缓冲区1与模板缓冲区2中的模板文件合并生成模板，结果存于模板缓冲区1。 Combine feature file.
    `int[]` | `search(Fingerprint.BufferEnum buffer, int startPage, int pageNum)` 检索指纹库 Searching fingerprint database
    `boolean` | `setDeviceName(java.lang.String name)` 设置设备名称 Setup device name
    `boolean` | `setManuFacture(java.lang.String name)` 设置厂商名称 Setup manufacture name
    `boolean` | `setPWD(java.lang.String passWord)` 设置密码 Setup password
    `boolean` | `setReg(int regID, int value)` 设置寄存器值，修改模块参数 Setup the value in RAM, modify the parameter in module.
    `boolean` | `storChar(Fingerprint.BufferEnum buffer, int pageID)` 存储模板文件。将模板缓冲区buffer中的模板文件存到 PageID号所对应的指纹库位置 save templatefile.
    `java.lang.String` | `upChar(Fingerprint.BufferEnum buffer)` 上传指定缓冲区中的指纹特征数据 Upload fingerprint feature data of specified buffer zone
    `int` | `upImage(int mode, java.lang.String fileName)` 上传指纹图像文件 Upload finerprint image file
    `int` | `upImageISO(int mode, java.lang.String fileName)` 上传指纹ISO图像文件 Upload fingerprint ISO image file
    `boolean` | `validPWD(java.lang.String passWord)` 验证密码 Verify password
    `int` | `validTempleteNum()` 获取模块中已保存的指纹特征数据个数 Acquire number of saved fingerprint feature data in module

- - ### Method Detail

    - #### init

          boolean init()

      初始化指纹模块，默认波特率为57600
      Initialize fingerprint module, default baud rate is 57600.
      Returns:
        true成功，false失败

    - #### init

          boolean init(int baudrate)

      初始化指纹模块
      Initialize fingerprint module.
      Parameters:
        `baudrate` - 波特率(57600或115200)
        Baud rate(57600 or 115200)
      Returns:
        true成功，false失败

    - #### free

          boolean free()

      释放指纹模块
      Release fingerprint module.
      Returns:
        true成功，false失败

    - #### getRandomData

          java.lang.String getRandomData()

      获取随机数，检测模块是否正常
      Acquire random number, detect module is normal or not.
      Returns:
        random number content in hexdecimal format, null means failure.

    - #### getImage

          boolean getImage()

      获取指纹图像（存于模块图像缓存区）
      Acquire fingerprint image( save in buffer zone of module image)
      Returns:
        true成功，false失败

    - #### genChar

          boolean genChar(Fingerprint.BufferEnum buffer)

      生成特征值（存于指定缓存区）
      Generate feature value( save in specified buffer zone)
      Parameters:
        `buffer` - 缓冲区编号枚举 Buffer zone code example
      Returns:
        true成功，false失败

    - #### search

          int[] search(Fingerprint.BufferEnum buffer,
                       int startPage,
                       int pageNum)

      检索指纹库
      Searching fingerprint database
      Parameters:
        `buffer` - 缓存区
        Buffer zone
        `startPage` - 页开始ID
        Page start ID
        `pageNum` - 从startPage开始的num个
        Page number from start Page
      Returns:
        number 0 is page ID, 1st element is comparison result, feedback null if it is failure.

    - #### match

          int match()

      对比模板缓冲区1与模板缓冲区2的指纹模板文件
      fingerprint template file of comparison template buffer zone 1 and template buffer zone 2.
      Returns:
        comparison score, if comparison failed, feedback is -1.

    - #### regModel

          boolean regModel()

      合并特征文件。将模板缓冲区1与模板缓冲区2中的模板文件合并生成模板，结果存于模板缓冲区1。
      Combine feature file. combine the template file in template buffer zone 1 and template buffer zone 2 then generate template, save the result in template buffer zone 1.
      Returns:
        true成功，false失败

    - #### storChar

          boolean storChar(Fingerprint.BufferEnum buffer,
                           int pageID)

      存储模板文件。将模板缓冲区buffer中的模板文件存到 PageID号所对应的指纹库位置
      save templatefile. save the template file of template buffer zone in according position of PageID.
      Parameters:
        `buffer` - 缓冲区
        Buffer zone
        `pageID` - 页ID，值为0~254
        PageID, value range 0~254
      Returns:
        true成功，false失败

    - #### loadChar

          boolean loadChar(Fingerprint.BufferEnum buffer,
                           int pageID)

      加载指定ID页到特征值缓存区
      Load specified ID page to feature value buffer zone
      Parameters:
        `buffer` - 缓存区
        Buffer zone
        `pageID` - 页ID
        Page ID
      Returns:
        true成功，false失败

    - #### upChar

          java.lang.String upChar(Fingerprint.BufferEnum buffer)

      上传指定缓冲区中的指纹特征数据
      Upload fingerprint feature data of specified buffer zone
      Parameters:
        `buffer` - 缓存区
        buffer zone
      Returns:
        hexdecimal feature value, null means failure.

    - #### downChar

          boolean downChar(Fingerprint.BufferEnum buffer,
                           java.lang.String hexStr)

      下载特征数据到指定缓存区
      download feature data to specified buffer zone
      Parameters:
        `buffer` - 缓存区
        Buffer zone
        `hexStr` - 十六进制特征数据
        hexdecimal feature data
      Returns:
        true成功，false失败

    - #### deletChar

          boolean deletChar(int pageID,
                            int num)

      删除库中特征值
      delete feature value in database.
      Parameters:
        `pageID` - 页ID
        PageID
        `num` - 从PageID开始的num个
        Page number from PageID.
      Returns:
        true成功，false失败

    - #### empty

          boolean empty()

      清空模块中保存的指纹数据
      empty out saved fingerprint data in module.
      Returns:
        true成功，false失败

    - #### setReg

          boolean setReg(int regID,
                         int value)

      设置寄存器值，修改模块参数
      Setup the value in RAM, modify the parameter in module.
      Parameters:
        `regID` - 寄存器ID
        RAM ID
        `value` - 需要修改的值
        Values need to be modified
      Returns:
        true成功，false失败

    - #### autoEnroll

          int autoEnroll(int count,
                         int userID)

      刷指定次数指纹，模块自动完成注册功能
      Scan fingerprint in specified number, module complete registered function automatically
      Parameters:
        `count` - 次数
        frequency
        `userID` - 注册ID
        Registered ID
      Returns:
        register success return ID, failure return -1

    - #### autoMatch

          int[] autoMatch(int count,
                          int startPage,
                          int pageNum)

      刷指定次数指纹，自动完成比对功能
      Scan fingerprint in specified number, complete comparison function automatically
      Parameters:
        `count` - 次数
        frequency
        `startPage` - 起始页
        Start page
        `pageNum` - 页数
        Page number
      Returns:
        1st element is successful matchin ID, 2nd element is comparison score, null is failure.

    - #### validTempleteNum

          int validTempleteNum()

      获取模块中已保存的指纹特征数据个数
      Acquire number of saved fingerprint feature data in module
      Returns:
        successful return number of fingerprint feature data, failed return -1

    - #### readChipSN

          java.lang.String readChipSN()

      获取芯片序列号
      acquire chip serial number
      Returns:
        hexdecimal chip serial number, null is failure

    - #### setManuFacture

          boolean setManuFacture(java.lang.String name)

      设置厂商名称
      Setup manufacture name
      Parameters:
        `name` - 名称,缓存 8字节
        Name, cache 8 bytes
      Returns:
        true成功，false失败

    - #### setDeviceName

          boolean setDeviceName(java.lang.String name)

      设置设备名称
      Setup device name
      Parameters:
        `name` - 设备名称,缓存 8字节
        Device name, cache 8 byte
      Returns:
        true成功，false失败

    - #### readSysPara

          java.lang.String readSysPara()

      获取系统参数，仅返回版本号
      Acquire system parameter, return version number only
      Returns:
        hexdecimal parameter data, null is failure

    - #### getVersion

          java.lang.String getVersion()

      获取模块版本
      Acquire module version
      Returns:
        null is failure

    - #### upImage

          int upImage(int mode,
                      java.lang.String fileName)

      上传指纹图像文件
      Upload finerprint image file
      Parameters:
        `mode` - 是否带bmp格式头文件 0表示不带 大于0表示带。默认为1
        be with bmp header file or not, 0 means without, greater than 0 means with. Default 1
        `fileName` - 文件路径，包括文件名，函数根据该参数生成图像文件
        File directory, including file name, the formula will generate image file according to this parameter
      Returns:
        success return image size value, failure return -1

    - #### upImageISO

          int upImageISO(int mode,
                         java.lang.String fileName)

      上传指纹ISO图像文件
      Upload fingerprint ISO image file
      Parameters:
        `mode` - 是否带bmp格式头文件 0表示不带 大于0表示带。默认为1
        be with bmp header file or not, 0 means without, greater than 0 means with. Default 1
        `fileName` - 文件路径，包括文件名，函数根据该参数生成图像文件
        file directory, including file name, formula will generate image file according to this parameter
      Returns:
        success return image size value, failure return -1

    - #### setPWD

          boolean setPWD(java.lang.String passWord)

      设置密码
      Setup password
      Parameters:
        `passWord` - 密码
        password
      Returns:
        true成功，false失败

    - #### validPWD

          boolean validPWD(java.lang.String passWord)

      验证密码
      Verify password
      Parameters:
        `passWord` - 密码
        Password
      Returns:
        true成功，false失败

    - #### readSysParaMore

          java.lang.String[] readSysParaMore()

      获取系统参数
      Acquire system parameter
      Returns:
        [0]safety level [1]distribute size [2]baud rate [3]product serial code [4]version number [5]manufacture code [6]sensor name, null means failure

    - #### isPowerOn

          boolean isPowerOn()